#pragma once

#include <cstdint>
#include <cstddef>
#include <memory>

#include <opencv2/core/core.hpp>

class TrackerKCFdsp
{
public:
    typedef std::shared_ptr<TrackerKCFdsp> Ptr;

    explicit TrackerKCFdsp(int img_width, int img_height, int patch_size = 96, bool multiscale = true);
    ~TrackerKCFdsp();

    // Update tracker based on the object's ROI and new frame data
    void update(const cv::Rect& src_roi, cv::Mat src_image, float train_interp_factor, int32_t *dsp_usec);
    void update(const cv::Rect& src_roi, float train_interp_factor, int32_t *dsp_usec);

    // Detect object in the current frame
    cv::Rect detect(const cv::Rect& dst_roi, cv::Mat dst_image, float& peak_value, int32_t *dsp_usec);

    void get_debug(void *buf, size_t bufsize);
private:
    
    void* handle;
};

